[index]

Offset Function

Syntax

offset (<substring>, <string>)

Description

The offset function locates the first occurrence of <substring> within <string> and returns the location as the number of the character in <string> where <substring> begins. The offset function is case insensitive. If <substring> is not found, the offset function returns 0. Either text string can be specified directly or via a container (variable, field, or property).

Notes

The parameters passed to the offset function can both be arithmetic and logical (as well as text) expressions; after evaluation, the results are treated as strings.

Examples

Create a button and put the following handler into the button script: on mouseUp put offset ("i", "children") into message end mouseUp
This text has been mechanically extracted from the Oracle Media Objects 1.0.4.9 MediaTalk Reference, © 1995 Oracle Corporation, and is provided here solely for educational/historical purposes.